{% extends 'rbac/base.html' %}
{% block addcss %}
    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/css/plugins/select2/select2.min.css" rel="stylesheet">

    <style>
        .form-group ul {
            list-style-type: none;
            padding: 0;
        }

        .form-group ul li {
            float: left;
            padding: 10px;
            padding-left: 0;
            {#width: 80px;#}
        }

        .form-group ul li i {
            font-size: 18px;
            margin-left: 5px;
            color: #6d6565;
        }

    </style>
{% endblock %}
{% block content %}
    {% load menu %}
    {% breadcrumb request %}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-title">
                        <h5>
                            {% with request.breadcrumb|last as last %}
                                {{ last.title }}
                            {% endwith %}
                        </h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form method="post">
                            {% csrf_token %}
                            {% for form in forms %}
                                <div class="form-group  row">
                                    <label class="col-sm-2 col-form-label">{{ form.label }}</label>

                                    <div class="col-sm-8">
                                        {{ form }}
                                        <span class="form-text m-b-none text-danger">{{ form.errors.0 }}</span>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                            {% endfor %}
                            <div class=" form-group row">
                                <div class="col-sm-2">
                                </div>
                                <div class="col-sm-10">
                                    <a href="javascript:history.go(-1)" class="btn btn-danger btn-sm">取消</a>
                                    <input class="btn btn-primary btn-sm" type="submit" value="保存更改">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


{% endblock %}
{% block addjs %}
    <script src="/static/js/plugins/select2/select2.full.min.js"></script>
    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
    <script>
        $(document).ready(function () {
            $(".select2_demo_1").select2();
            $(".select2_multi").select2();
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        })
    </script>
{% endblock %}